package com.example.hello;

import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        // 仅保留必要的布局初始化，移除所有无关代码
    }

    public void onClick_Button(View view) {
        // 获取TextView并修改颜色
        TextView textView = findViewById(R.id.textView);
        textView.setTextColor(Color.RED);
    }
}